<template>
  <div>
    <div class="nav" v-if="$route.meta.show">
      <!-- <router-link to="/home" tag="span">首页</router-link>
        <router-link to="/person" tag="span">个人中心</router-link>
        <router-link to="/about" tag="span">关于</router-link> -->

      <router-link tag="span"  to="/home">
        <!-- <van-icon size="20" name="wap-home" /> -->
        <i class="iconfont icon-shouye"></i>
        <i class="txt">首页</i>
      </router-link>
      <router-link tag="span"  to="/catage">
        <!-- <van-icon size="20" name="coupon" /> -->
        <i class="iconfont icon-fenlei"></i>
        <i class="txt">分类</i>
      </router-link>
      <router-link tag="span"  to="/cart">
        <!-- <van-icon size="20" name="shopping-cart" /> -->
        <i class="iconfont icon-cart"></i>
        <i class="txt">购物车</i>
      </router-link>
      <router-link  tag="span" to="/me">
        <!-- <van-icon size="20" name="manager" /> -->
        <i class="iconfont icon-me"></i>
        <i class="txt">我的</i>
      </router-link>
    </div>
    <router-view></router-view>
    <!-- <div class="header">
          <router-view ></router-view>
     </div>
     <div class="container">
        <router-view name="l"></router-view>
        <router-view name="r"></router-view>
     </div> -->
  </div>
</template>


<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
}
// scoped 样式只在当前组件起作用
.nav {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  border-top: 1px solid #eee;
  z-index: 100;
  span {
    flex: 1;
    height: 50px;
    // border: 1px solid #666;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    &.router-link-active {
      color: red;
    }
    .iconfont{
      font-size: 25px;
    }
    .txt{
      font-size: 8px;
      font-style: normal;
    }
  }
}

.home {
  width: 100%;
  height: 100%;
  .header {
    height: 80px;
    // background-color: red;
  }
  .container {
    display: flex;
    flex-direction: row;
  }
}
</style>